﻿using System;
using System.Configuration;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Common.Unity.Extensions.Configuration.Testing.Objects;
using Microsoft.Practices.ObjectBuilder2;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.ObjectBuilder;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Testing.Core;

namespace Common.Unity.Extensions.Configuration.Testing
{
	/// <summary>
	/// Summary description for ConfigurationExtensionTests
	/// </summary>
	[TestClass]
	public class ConfigurationExtensionTests : TestBase
	{
		[TestMethod, Owner( TestOwners.MichaelD_Bang )]
		public void VerifySpyPolicyCreatedProperly()
		{
			var policy = Configuration.Container.Resolve<SpyPolicy>();
			Assert.IsTrue( policy.Enabled );
		}

		[TestMethod, Owner( TestOwners.MichaelD_Bang )]
		public void VerifySpyStrategyConfiguredCorrectly()
		{
			var target = Configuration.Container.Resolve<ISpyTarget>();
			Assert.IsTrue( target.WasSpiedOn );
		}
	}
}
